@extends('backstage.layout.master')
@section('title', '修改密码')
@section('content')
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try {
                ace.settings.check('breadcrumbs', 'fixed')
            } catch (e) {
            }
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="backstage/home">主页</a>
            </li>

        </ul><!-- .breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search">

            </form>
        </div><!-- #nav-search -->
    </div>

    <div class="page-content">
        <div class="page-header">
            <h1>
                修改密码
            </h1>
        </div>
        <div class="row">
            <!-- PAGE CONTENT BEGINS -->

            <div class="col-md-4" style="float: none;margin: 0 auto">
                <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                    <input type="hidden" name="username" value="{{Session::get('admin')->username}}">
                    <div class="profile-user-info profile-user-info-striped">
                        <div class="profile-info-row">
                            <div class="profile-info-name"> 用户名</div>
                            <div class="profile-info-value"><span class="username">{{Session::get('admin')->username}}</span>
                            </div>
                        </div>
                        <div class="profile-info-row">
                            <div class="profile-info-name"> 新密码</div>
                            <div class="profile-info-value">
                                <input type="password" name="password" required="required" style="padding: 0;" class="password">
                            </div>
                        </div>
                        <div class="profile-info-row">
                            <div class="profile-info-name"> 再次输入新密码</div>
                            <div class="profile-info-value">
                                <input type="password" name="password" required="required" style="padding: 0;" class="repwd">
                                <span style="color: red;margin-left: 10px;display: none" class="pwd-err">两次密码不一致</span>
                            </div>
                        </div>
                    </div>
                    <input type="submit" class="btn btn-success done" style="margin-top:10px;float: right;margin-right:2.5%" value="完成">
                </form>
            </div>

            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
    </div><!-- /.page-content -->
@stop
@section('script')
    <script type="text/javascript">
        $(function () {
            $(".done").click(function(){
                var password = $(".password").val();
                var repwd = $(".repwd").val();
                if(password != repwd){
                    $(".pwd-err").show();
                    return false;
                }
            });

        });
    </script>
@stop